<?php

namespace app\modules\indexapi\controllers;

use app\models\Shopcart;

class ShopcartController extends BaseActiveController
{
    public $modelClass = Shopcart::class;

    protected function buildQuery()
    {
        $user = \Yii::$app->user->identity;
        return Shopcart::find()->where(['=', 'user_id', $user->id]);
    }
}
